package MethodApplication.MethodDemo6;

public class Arraydemo1 {
    public static int[] method(int a, CreateArray len){
        return len.buildArray(a);
    }

    public static void main(String[] args) {
       /* int[] method = method(10, (len) -> {
            return new int[len];
        });*/
        //引用数组的方法引用
        int[] method = method(10, int[]::new);
        System.out.println(method.length);
    }
}
